﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using MahApps.Metro;

namespace Mysoft.ServerMonitoring.OMKit.Views
{
    /// <summary>
    /// Interaction logic for MetroRibbon.xaml
    /// </summary>
    public partial class MetroRibbon
    {
        public MetroRibbon()
        {
            InitializeComponent();
        }

        private Theme currentTheme = Theme.Light;
        private Accent currentAccent = ThemeManager.DefaultAccents.First(x => x.Name == "Blue");

        private void ChangeAccent(string accentName)
        {
            this.currentAccent = ThemeManager.DefaultAccents.First(x => x.Name == accentName);

            ThemeManager.ChangeTheme(this, this.currentAccent, this.currentTheme);
        }

        private void AccentRed(object sender, RoutedEventArgs e)
        {
            this.ChangeAccent("Red");
        }

        private void AccentGreen(object sender, RoutedEventArgs e)
        {
            this.ChangeAccent("Green");
        }

        private void AccentBlue(object sender, RoutedEventArgs e)
        {
            this.ChangeAccent("Blue");
        }

        private void AccentPurple(object sender, RoutedEventArgs e)
        {
            this.ChangeAccent("Purple");
        }

        private void AccentOrange(object sender, RoutedEventArgs e)
        {
            this.ChangeAccent("Orange");
        }

        private void ThemeLight(object sender, RoutedEventArgs e)
        {
            this.currentTheme = Theme.Light;
            ThemeManager.ChangeTheme(this, this.currentAccent, Theme.Light);
        }

        private void ThemeDark(object sender, RoutedEventArgs e)
        {
            this.currentTheme = Theme.Dark;
            ThemeManager.ChangeTheme(this, this.currentAccent, Theme.Dark);
        }
    }
}
